<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #box {
        width: 500px;
        border: solid;
        margin: 100px 0 0 200px;
      }

      #box p {
        height: 300px;
        border: solid;
      }
    </style>
  </head>
  <body>
    <div id="box">
      <p>hello p1</p>
      <p>hello p2</p>
      <p>hello p3</p>
      <p>hello p4</p>
      <p>hello p5</p>
    </div>
    <script>
      const box = document.getElementById("box");

      box.onclick = function (e) {
        console.log("clientX/Y", e.clientX, e.clientY);
        console.log("pageX/Y", e.pageX, e.pageY);
      };
    </script>
  </body>
</html>
